package com.itheima.health.service.impl;

import com.itheima.health.dao.MobileSetMealDao;
import com.itheima.health.pojo.Setmeal;
import com.itheima.health.service.MobileSetMealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class MobileSetMealServiceImpl implements MobileSetMealService {
    @Autowired
    private MobileSetMealDao mobileSetMealDao;
    @Override
    public List<Setmeal> findAllSetmeal() {
        List<Setmeal> setmeals = mobileSetMealDao.selectAllSetmeal();
        return setmeals;

    }

    @Override
    public Setmeal findSetmealById(Integer id) {
        Setmeal setmeal = mobileSetMealDao.selectSetmealById(id);
        return setmeal;
    }

    @Override
    public List<Integer> findGroupsIdBySetmealId(Integer id) {
        List<Integer> groupIds = mobileSetMealDao.selectGroupsIdBySetmealId(id);
        return groupIds;
    }

    @Override
    public List<Integer> findCheckItemIdsByCheckGroupId(Integer id) {
        List<Integer> checkItemIds = mobileSetMealDao.selectCheckItemIdsByCheckGroupId(id);
        return checkItemIds;
    }

}
